package services.impl;

import beans.EmployeeInfo;
import dao.EmployeeInfoDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import services.EmployeeService;

import java.util.List;

@Service
public class EmployeeServiceImpl implements EmployeeService {

    @Autowired
    private EmployeeInfoDao employeeDao;


    @Override
    public int deleteByPrimaryKey(Integer id) {
        int i = employeeDao.deleteByPrimaryKey(id);
        return i;

    }

    @Override
    public int insert(EmployeeInfo record) {
        int i = employeeDao.insert(record);
        return i;
    }

    @Override
    public int insertSelective(EmployeeInfo record) {
        int i = employeeDao.insertSelective(record);
        return i;
    }

    @Override
    public EmployeeInfo selectByPrimaryKey(Integer id) {
        EmployeeInfo employeeInfo = employeeDao.selectByPrimaryKey(id);
        return employeeInfo;
    }

    @Override
    public int updateByPrimaryKeySelective(EmployeeInfo record) {
        int i = employeeDao.updateByPrimaryKeySelective(record);
        return i;
    }

    @Override
    public int updateByPrimaryKey(EmployeeInfo record) {
        int i = employeeDao.updateByPrimaryKey(record);
        return i;
    }

    @Override
    public List<EmployeeInfo> selectList() {
        List<EmployeeInfo> list = employeeDao.selectList();
        return list;
    }
    @Override
    public List<EmployeeInfo> selectSelective(String select,String inputText) {
        List<EmployeeInfo> list = employeeDao.selectSelective(select,inputText);
        return list;
    }

    @Override
    public int count() {
        return employeeDao.count();
    }
}
